#! /bin/bash
# ->
# creates a symlink from Makefile.local to the appropriate Makefile
# (which depends on the hostname)

hn="$(hostname)"
fout="Makefile.local"
flock=".hostname"

echo "$hn" > "$flock"

case "$hn" in
homer)
    mkf=homer;;
poux*)
    mkf=poux;;
ippc*)
    mkf=poux;;
porbou*)
    mkf=qnc;;
*) 
    echo "No appropriate makefile" 1>&2
    exit 1
    ;;
esac

rm -f "$fout"
ln -vs Makefile.$mkf "$fout"
